﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<MMShortURL.Models.URLModels>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Short URL</title>
    
    <style type="text/css">
        body                    {margin:0; padding:0; background-color:#EBE7E0; font-family:"Lucida Grande", "Corbel", Arial; text-align:center;}
        #container          {width:600px; margin:0 auto;}
        #container div         {padding:15px; background-color:#C6D4E1; border:solid 1px #44749D; text-align:center; margin-bottom:20px;}
        input               {padding:10px; font-size:160%;}
    </style>
</head>
<body>
     
    <% using (Html.BeginForm()) { %>
        <%: Html.ValidationSummary(true, "Creating URL was unsuccessful. Please correct the errors and try again.") %>
        <div>
            <fieldset>
                <legend></legend>
                
                <div class="editor-label">
                    <%: Html.LabelFor(m => m.OrigURL) %>
                </div>
                <div class="editor-field">
                    <%: Html.TextBoxFor(m => m.OrigURL) %>
                    <%: Html.ValidationMessageFor(m => m.OrigURL)%>
                </div>
                               
                <p>
                    <input type="submit" value="Create URL" />
                </p>
            </fieldset>
        </div>
         <div>
            Your new shortened URL is :
              <%: ViewData["URLMessage"] %>
        </div>
    <% } %>
    
</body>
</html>

